BuffEffect19 = BaseBuffEffect:new();
BuffEffect19.__index = BuffEffect19;

function BuffEffect19:new()
    local object = {};
    setmetatable(object, BuffEffect19);
    return object;
end

function BuffEffect19:action(fight,buff,...)
    local target = buff.target;
    local values = decodeJsonStrToTabel(buff.buffBean.f_Value);
    local value = FighterAttributeManager.getFightAttr(target,EnumConst.FighterAttributeEnum.HP) * values[1]/EnumConst.TEN_THOUSANDTH;
    BaseBuffEffect:resetAttribute(fight,buff);
    if target.hp < value then
        BaseBuffEffect:addAttribute(fight,buff,values,2);

        fightLog("[EFFECT]Fighter "..buff.target.fighterId.." Buff"..buff.modelId.." 触发场上生命值低于增加属性效果，增加属性["..values[2].."]："..values[3]);
    end
    return EnumConst.IBuffEffect.RESET;
end
